set(formic_dir_for_this_test ${FORMIC_BINARY_DIR}/Testing/tests/h4_631g_bfgs)

file(MAKE_DIRECTORY ${formic_dir_for_this_test})
configure_file(input.txt ${formic_dir_for_this_test}/input.txt COPYONLY)
configure_file(h4_ints.txt ${formic_dir_for_this_test}/h4_ints.txt COPYONLY)

add_test(NAME h4_631g_bfgs_fqmc
         WORKING_DIRECTORY ${formic_dir_for_this_test}
         COMMAND fqmc input.txt output.txt
        )

add_test(NAME h4_631g_bfgs_check_fqmc
         WORKING_DIRECTORY ${formic_dir_for_this_test}
         COMMAND test_checker -compare_float "fqmc exact sampling optimized energy"
                                             output.txt
                                             "mean ="
                                             -1
                                             -2.252921433997
                                             1.0e-6
        )

unset(formic_dir_for_this_test)

#add_executable(fqmc_test_h4_bfgs test.cpp)
#target_link_libraries(fqmc_test_h4_bfgs formic_fqmc
#                                        formic_test_driver)
#
#configure_file(h4_ints.txt ${FORMIC_BINARY_DIR}/src/formic/fqmc/test_h4_bfgs/h4_ints.txt
#               COPYONLY
#              )
#
#configure_file(input.txt ${FORMIC_BINARY_DIR}/src/formic/fqmc/test_h4_bfgs/input.txt
#               COPYONLY
#              )
#
#add_test(NAME fqmc_test_h4_bfgs
#         WORKING_DIRECTORY ${FORMIC_BINARY_DIR}/src/formic/fqmc/test_h4_bfgs
#         COMMAND fqmc_test_h4_bfgs input.txt output.txt
#        )
